package com.toefl.speaking.handler;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import org.apache.http.NameValuePair;
import org.apache.http.client.ClientProtocolException;

import android.content.Context;

import com.toefl.speaking.util.AppConstans;
import com.toefl.speaking.util.AppUtils;

public class DownloadsHandler {

	private static DownloadsHandler instance;

	private DownloadsHandler() {

	}

	public static DownloadsHandler instance() {
		if (instance == null) {
			instance = new DownloadsHandler();
		}
		return instance;
	}

	public String postDownloadAnswer(Context context) throws ClientProtocolException, IOException {
		List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
		return AppUtils.httpPost(AppConstans.INTERFACE_URL, nameValuePairs);
	}

	public String postDownloadReportr(Context context) throws ClientProtocolException, IOException {
		List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
		return AppUtils.httpPost(AppConstans.INTERFACE_URL, nameValuePairs);
	}

	public String postDownloadReward(Context context) throws ClientProtocolException, IOException {
		List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
		return AppUtils.httpPost(AppConstans.INTERFACE_URL, nameValuePairs);
	}

	public String postDownloadTopic(Context context) throws ClientProtocolException, IOException {
		List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
		return AppUtils.httpPost(AppConstans.INTERFACE_URL, nameValuePairs);
	}

}
